package it.unibz.easytravel.expenses;

/**
 * Object of debt
 * @author Tadas & Valdemaras
 */
public class Debt {

	private String creditor;
	private String debtor;
	private int amount;
	private boolean used;
	private int level;
	private boolean executed;
	private int index;
	
	public String toString(){
		return debtor+">"+creditor+" "+amount+"\n";
	}
	public String toString(boolean b){
		return debtor+">"+creditor+" "+amount+"|"+executed+" "+used+"\n";
	}
	
	public Debt(String creditor, String forWhom, int debt) {
		this.creditor = creditor;
		this.debtor = forWhom;
		this.amount = debt;
	}
	
	public String getCreditor(){
		return creditor;
	}

	public String getDebtor(){
		return debtor;
	}

	public int getDebt(){
		return amount;
	}
	
	public void addDebt(int debt){
		this.amount += debt;
	}

	public void setDebt(int debt){
		this.amount = debt;
	}
	
	public boolean isUsed(){
		return used;
	}

	public void setUsed(boolean used){
		this.used = used;
	}
	
	public void setLevel(int level){
		this.level = level;
	}
	
	public int getLevel() {
		return level;
	}

	public void setExecuted(boolean executed){
		this.executed = executed;
	}
	
	public boolean isExecuted() {
		return executed;
	}
	
	public void setIndex(int index){
		this.index = index;
	}
	
	public int getIndex() {
		return index;
	}
	
}

